package com.sl.au.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * 售后服务单： 
 * 
 */
@Entity
@Table(name = "sl_crm_afterSaleTicket")
public class AfterSaleTicket extends Root {

	//// 申请单部分///////
	/**
	 * 订货单位名称
	 */
	@Column(name = "sUnitName")
	private String unitName;
	/**
	 * 合同号
	 */
	@Column(name = "sContractCode")
	private String contractCode;

	/** 合同的项目名称 */
	@Transient
	private String  contractProjectName;

	/** 合同类型 */
	@Transient
	private String contractType;

	/**
	 * 合同ID
	 */
	@Column(name = "sContractId")
	private String contractId;

	/**
	 * 申请人
	 */
	@Column(name = "sProposer")
	private String proposer;

	/**
	 * User_id
	 */
	@OneToOne
	@JoinColumn(unique = false)
	private User user;

	/**
	 * 提交人
	 */
	@OneToOne
	@JoinColumn(unique = false)
	private User submiter;

	/**
	 * 现场联系人
	 */
	@Column(name = "sLinkMan")
	private String linkMan;
	/**
	 * 联系方式
	 */
	@Column(name = "sLinkManPhone")
	private String linkManPhone;
	/**
	 * 售后类型
	 */
	@Column(name = "sAfterSaleType")
	private String afterSaleType;

	/**
	 * 设备ID
	 */
	@Column(name = "sDeviceId")
	private String deviceId;
	/**
	 * 设备名称
	 */
	@Column(name = "sDeviceName")
	private String deviceName;
	/**
	 * 设备编号
	 */
	@Column(name = "sDeviceCode")
	private String deviceCode;
	/**
	 * 设备型号
	 */
	@Column(name = "sDeviceNumber")
	private String deviceNumber;
	/**
	 * 问题描述
	 */
	@Column(name = "sQuestionDetail",length=1337)
	private String questionDetail;
	/**
	 * 服务时间
	 */
	@Column(name = "dServiceTime")
	@Temporal(TemporalType.TIMESTAMP)
	private Date serviceTime;

	////// 售后内勤完善部分//////////
	/**
	 * 问题跟踪描述
	 */
	@Column(name = "sQuestionTrance",length=1337)
	private String questionTrance;

	/**
	 * 是否符合派遣条件 是：1 否：0
	 */
	@Column(name = "nIsSuitably")
	private int isSuitably;
	/**
	 * 管理代码
	 */
	@Column(name = "sManageCode")
	private String manageCode;
	/**
	 * 处理方案
	 */
	@Column(name = "sDealPlan")
	private String dealPlan;
	/**
	 * 经办人
	 */
	@Column(name = "sOperator")
	private String operator;
	/**
	 * 办理进度
	 */
	@Column(name = "sDealRate")
	private String dealRate;
	/**
	 * 发货时间
	 */
	@Column(name = "dSendDate")
	@Temporal(TemporalType.TIMESTAMP)
	private Date sendDate;
	/**
	 * 货物是否到达现场 是：1 否：0
	 */
	@Column(name = "nIsArrive")
	private int isArrive;
	/**
	 * 运单号
	 */
	@Column(name = "sWaybillNum")
	private String waybillNum;

	/**
	 * 服务单状态 是：0 未提交，1 退回，2 已提交，3 以派遣，4跟踪中，5待回访，6 完成
	 */
	@Column(name = "nIsSubmit")
	private String isSubmit;
	/**
	 * 发起部门
	 */
	@Column(name = "sSuperior")
	private String superior;
	/**
	 * 服务单状态
	 */
	@Column(name = "sTicketState")
	private String ticketState;

	/**
	 * 服务单审批状态
	 */
	@Column(name = "sAuditState")
	private String auditState;

	/////// 服务单售后总结/////////
	/**
	 * 售后总结
	 */
	@Column(name = "sAfterSummary")
	private String afterSummary;

	/**
	 * 售后评价
	 */
	@Column(name = "sAssess")
	private String assess;

	/**
	 * 售后评价备注
	 */
	@Column(name = "sAssessMemo")
	private String assessMemo;
	
    /**
     * 附件
     */
    @Transient
	private Integer attachNumber;
	
	public Integer getAttachNumber() {
		return attachNumber;
	}

	public void setAttachNumber(Integer attachNumber) {
		this.attachNumber = attachNumber;
	}

	public String getContractProjectName() {
		return contractProjectName;
	}

	public void setContractProjectName(String contractProjectName) {
		this.contractProjectName = contractProjectName;
	}

	public String getContractType() {
		return contractType;
	}

	public void setContractType(String contractType) {
		this.contractType = contractType;
	}

	public String getAfterSummary() {
		return afterSummary;
	}

	public void setAfterSummary(String afterSummary) {
		this.afterSummary = afterSummary;
	}

	public String getAssess() {
		return assess;
	}

	public void setAssess(String assess) {
		this.assess = assess;
	}

	public String getAssessMemo() {
		return assessMemo;
	}

	public void setAssessMemo(String assessMemo) {
		this.assessMemo = assessMemo;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	

	public User getSubmiter() {
		return submiter;
	}

	public void setSubmiter(User submiter) {
		this.submiter = submiter;
	}

	public Date getServiceTime() {
		return serviceTime;
	}

	public void setServiceTime(Date serviceTime) {
		this.serviceTime = serviceTime;
	}

	public String getQuestionTrance() {
		return questionTrance;
	}

	public void setQuestionTrance(String questionTrance) {
		this.questionTrance = questionTrance;
	}

	public String getAuditState() {
		return auditState;
	}

	public void setAuditState(String auditState) {
		this.auditState = auditState;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getContractCode() {
		return contractCode;
	}

	public void setContractCode(String contractCode) {
		this.contractCode = contractCode;
	}

	public String getProposer() {
		return proposer;
	}

	public void setProposer(String proposer) {
		this.proposer = proposer;
	}

	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	public String getLinkManPhone() {
		return linkManPhone;
	}

	public void setLinkManPhone(String linkManPhone) {
		this.linkManPhone = linkManPhone;
	}

	public String getAfterSaleType() {
		return afterSaleType;
	}

	public void setAfterSaleType(String afterSaleType) {
		this.afterSaleType = afterSaleType;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceCode() {
		return deviceCode;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}

	public String getDeviceNumber() {
		return deviceNumber;
	}

	public void setDeviceNumber(String deviceNumber) {
		this.deviceNumber = deviceNumber;
	}

	public String getQuestionDetail() {
		return questionDetail;
	}

	public void setQuestionDetail(String questionDetail) {
		this.questionDetail = questionDetail;
	}

	public int getIsSuitably() {
		return isSuitably;
	}

	public void setIsSuitably(int isSuitably) {
		this.isSuitably = isSuitably;
	}

	public String getManageCode() {
		return manageCode;
	}

	public void setManageCode(String manageCode) {
		this.manageCode = manageCode;
	}

	public String getDealPlan() {
		return dealPlan;
	}

	public void setDealPlan(String dealPlan) {
		this.dealPlan = dealPlan;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getDealRate() {
		return dealRate;
	}

	public void setDealRate(String dealRate) {
		this.dealRate = dealRate;
	}

	public Date getSendDate() {
		return sendDate;
	}

	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}

	public int getIsArrive() {
		return isArrive;
	}

	public void setIsArrive(int isArrive) {
		this.isArrive = isArrive;
	}

	public String getWaybillNum() {
		return waybillNum;
	}

	public void setWaybillNum(String waybillNum) {
		this.waybillNum = waybillNum;
	}

	public String getIsSubmit() {
		return isSubmit;
	}

	public void setIsSubmit(String isSubmit) {
		this.isSubmit = isSubmit;
	}

	public String getSuperior() {
		return superior;
	}

	public void setSuperior(String superior) {
		this.superior = superior;
	}

	public String getTicketState() {
		return ticketState;
	}

	public void setTicketState(String ticketState) {
		this.ticketState = ticketState;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
